#include "StdAfx.h"
#include "ServerImpl.h"
#include "SystemInfo.h"
#include "ThreadManager.h"
#include "Server.h"

CServerImpl::CServerImpl(void)
{
	m_pSysInfo = new CSystemInfo();
	m_pThreadManager = new CThreadManager(this);
}

CServerImpl::~CServerImpl(void)
{
	if (NULL != m_pSysInfo)
	{
		delete m_pSysInfo;
		m_pSysInfo = NULL;
	}

	if (NULL != m_pThreadManager)
	{
		delete m_pThreadManager;
		m_pThreadManager = NULL;
	}
}

void CServerImpl::ThreadProcMain( void )
{

}

bool CServerImpl::Start( void )
{
	if (NULL==m_pSysInfo)
	{
		return false;
	}

	
	if (NULL == m_pThreadManager )
	{
		return false;
	}

	return true;
}

void CServerImpl::Stop( void )
{

}

void CServerImpl::Pause( void )
{

}

void CServerImpl::Resume( void )
{

}

void CServerImpl::SetServeInfos( const std::string& strSysInfos )
{
	m_strServerInfos = strSysInfos;
}

CSystemInfo* CServerImpl::GetSysInfo( void ) const
{
	return m_pSysInfo;
}

CThreadManager* CServerImpl::GetThreadManager( void ) const
{
	return m_pThreadManager;
}

const std::string& CServerImpl::GetSysInfos( void ) const
{
	return m_strServerInfos;
}

void CServerImpl::GetServerVersion( SERVER_VERSION& sVersion )
{
	sVersion.m_unMajor = 0;
	sVersion.m_unMinor = 0;
	sVersion.m_unChangeList = 0;
	sVersion.m_unMonitorProtocolVer = 0;
}
